import { supplierAdd, supplierShow,supplierEdit, supplierDel} from '@/api/supplier'
export default {
  namespaced: true, // 封闭
  state: {
  },
  mutations: {         
  },
  getters: {},
  actions: {
    async supplierShow(context, payload) {
      const {businessId } = payload
      try {
        const { data } = await supplierShow(payload)
        // console.log(businessId+"payload")
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async supplierAdd(context, payload) {
      // const {businessId } = payload
      try {
        const { data } = await supplierAdd(payload)

        return data
      } catch (err) {
        console.log(err)
      }
    },
    async supplierEdit(context, payload) {
      // const {businessId } = payload
      try {
        const { data } = await supplierEdit(payload)

        return data
      } catch (err) {
        console.log(err)
      }
    },
    async supplierDel(context, payload) {
      // const {businessId } = payload
      try {
        const { data } = await supplierDel(payload)

        return data
      } catch (err) {
        console.log(err)
      }
    }
}
}